﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace TaskLib
{   
    public interface ITaskFactory
    {
        ReadOnlyCollection<Task> Tasks { get; }

        event TasksChangedEventHandler TasksChanged;

        void SerializeTasks(string file);
        void DeserializeTasks(string file);

        Task CreateTask(string description, DateTime scheduled, string comment, bool notify);

        void UpdateTaskDescription(long id, string description);
        void UpdateTaskScheduled(long id, DateTime scheduled);
        void UpdateTaskCompleted(long id, bool completed);
        void UpdateTaskCompletion(long p, DateTime completion);
        void UpdateTaskComment(long id, string comment);       
        void UpdateTask(long id, string description, DateTime scheduled, string comment = null);

        bool MarkCompleted(long id, DateTime completed);
        bool MarkCompleted(long id);       
    }
}
